<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <link href="/static/mobile/login/css/login.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="/static/mobile/login/js/jquery.min.js"></script>

</head>
<body>

<section class="aui-flexView">
    <center>
        <div id="login_msg" style="color:red;"></div>
    </center>
    <header class="aui-navBar aui-navBar-fixed b-line">
        <a href="javascript:;" class="aui-navBar-item" onclick="javascript:history.back(-1);">
            <i class="icon icon-return"></i>
        </a>
        <div class="aui-center">
            <span class="aui-center-title">登录</span>
        </div>
        <a href="/mobile/login/register" class="aui-navBar-item">
            <i class="icon icon-sys"></i>注册
        </a>
    </header>
    <section class="aui-scrollView">
        <div class="aui-code-box">
            <form  id="form" onsubmit="return false">
                <p class="aui-code-line">
                    <input type="text" class="aui-code-line-input" value="" name="account" id="account" autocomplete="off" placeholder="请输入账号"/>
                </p>
                <p class="aui-code-line aui-code-line-clear">

                    <i class="aui-show  operate-eye-open"></i>
                    <input type="password" class="aui-code-line-input password" name="password" id="password" placeholder="密码" value="">
                </p>
                <div class="aui-flex-links">
                    <!-- <a href="javascript:;">
                         <label class="cell-right">
                             <input type="checkbox" value="1" name="checkbox">
                             <i class="cell-checkbox-icon"></i>记住密码
                         </label>
                     </a> -->
<!--                    <a href="javascript:;">忘记密码?</a>-->
                </div>
                <div class="aui-code-btn">
                    <button id="login_btu">登录</button>
                </div>
            </form>
        </div>
        <!-- <div class="aui-login-line">
             <h2>第三方登录</h2>
         </div>-->
        <!--<div class="aui-login-armor">
            <a href="javascript:;" class="aui-tabBar-item">
                <img src="images/icon-sin-001.png" alt="">
            </a>
            <a href="javascript:;" class="aui-tabBar-item">
                <img src="images/icon-sin-002.png" alt="">
            </a>
            <a href="javascript:;" class="aui-tabBar-item">
                <img src="images/icon-sin-003.png" alt="">
            </a>
        </div>-->
    </section>
</section>

<script type="text/javascript" src="/static/mobile/login/js/login.js"></script>
<script>
    $('input[name="account"]').click(function(){
        $("#login_msg").html('');
    });
    $('input[name="password"]').click(function(){
        $("#login_msg").html('');
    });
    $('#login_btu').click(function(){
        var account = $('input[name="account"]').val();
        var password = $('input[name="password"]').val();
        $.post('/mobile/login/login',{account:account,password:password},function(data){
           if(data.state != 200){
                $("#login_msg").html(data.msg);
           }else{
               $("#login_btu").html('正在登陆请稍后...');
               window.location.replace('/mobile/index/index')
           }
        });
    })
</script>
</body>
</html>
